<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="jquery.min.js"></script>



    <title>Document</title>
</head>
<body>
    <input name="name" type="text" value="" class="name" />
    <input name="age"  type="text" value=""  class="age"/>
   <input type="button" value="确定" class="sure" />

    <script>
         (function($){

            $(".sure").click(function(){
                console.log($(".name").val());
            });

         })(jQuery)
    </script>
</body>
</html>